home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / msdos / lynx / source / doslynx / src / tsockvie.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-25  |  993 b   |  34 lines

  1. //    Copyright (c) 1994, University of Kansas, All Rights Reserved
  2. //
  3. //    Class:        TSockView
  4. //    Include File:    tsockvie.h
  5. //    Purpose:    Display total amount of current network activity
  6. //    Remarks/Portability/Dependencies/Restrictions:
  7. //    Revision History:
  8. //        01-31-94    created
  9. //        02-10-94    Split all members into seperate files.
  10. #include"tsockvie.h"
  11.  
  12. extern "C"    {
  13. #include"msdostcp.h"
  14. };
  15.  
  16. unsigned long int TSockView::GetSockSize()    {
  17. //    Purpose:    Return the current socket activity
  18. //    Arguments:    void
  19. //    Return Value:    unsigned long int    the current socket activity.
  20. //    Remarks/Portability/Dependencies/Restrictions:
  21. //    Revision History:
  22. //        01-31-94    created
  23.  
  24.     //    Count the total number of bytes read in written in sockets.
  25.     unsigned long int uli = 0UL;
  26.     for(int i_counter = 0; i_counter < MAXSOCKETS; i_counter++)    {
  27.         if(sock_table[i_counter].vp_sockfd != NULL)    {
  28.             uli += sock_table[i_counter].uli_read +
  29.                 sock_table[i_counter].uli_written;
  30.         }
  31.     }
  32.  
  33.     return(uli);
  34. }